﻿using QMERP.Domain.Dtos;

namespace QMERP.Application.Services
{
    public interface IContractService
    {
        /// <summary>
        /// 获取合约列表基础数据
        /// </summary>
        /// <returns></returns>
        Task<List<ContractResponse>> GetBasicContracts();
        /// <summary>
        /// 获取此客户的所有的可用合约
        /// </summary>
        /// <param name="customerId"></param>
        /// <returns></returns>
        Task<List<ContractResponse>> GetContractByCustomerId(long customerId);
        /// <summary>
        /// 获取此仓库库存的合约镜种
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<Contract_LensResponse>> GetStockContractLenses(GetStockContractLensesRequest request);
        /// <summary>
        /// 合约窗体
        /// </summary>
        /// <returns></returns>
        Task<PageResponse<ContractResponse>> Query(PageRequest<ContractRequest> request);

        /// <summary>
        /// 获取id的合约详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ContractResponse> Detail(long id);

        /// <summary>
        /// 合约保存
        /// </summary>
        /// <param name="request"></param>
        /// <param name="isCheck"></param>
        /// <returns></returns>
        Task Save(ContractSaveRequest request, bool isCheck = false);

        /// <summary>
        /// 合约审核
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task Check(long[] ids);

        /// <summary>
        /// 合约弃审
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task UnCheck(long[] ids);

        /// <summary>
        /// 合约取消
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task Cancel(long[] ids);

        /// <summary>
        /// 获取合约列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<List<ContractResponse>> GetContracts(PageRequest<ContractRequest> request);
    }
}
